package org.ch03.test00.lx04;

/**
 * 可以指定多个边界
 *
 * @author ZQX
 * @date 2025-03-26
 */
public class People<P extends ICall & IWenShun> {
    /**
     * 宠物
     */
    private P pet;

    public P getPet() {
        return pet;
    }

    public void setPet(P pet) {
        this.pet = pet;
    }

    /**
     * 逛街
     */
    public void shopping() {
        System.out.println("逛街...");
        pet.call();
    }

}
